<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../org/angular.min.js"></script>
</head>
<body>
    <div ng-app="vm">
        {{name}} <input type="text" ng-model="name">

        <br/>
        <hd></hd>
    </div>
    <script>
        var vm = angular.module('vm',[]);
        vm.controller('ctrl',['$scope',function($scope){
              $scope.name = "后盾人"
        }])
        vm.directive('hd',[function(){
            return {
                restrict:"AEC",
                template:"{{name}}<input type='text' ng-model='name'>",
                scope:{}
            }
        }])
    </script>
</body>
</html>